package com.simons.module.shiro;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * shiro token令牌 ，由于用jwt，token可安全解析出各种信息，这里只留下token字符串即可
 */
public class StatelessToken implements AuthenticationToken {
    private static final long serialVersionUID = -1L;
    private String token;

    public StatelessToken(String token){
        this.token = token;
    }


    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}